#include <glib.h>
#include "common.h"

/*******************************************
 * D E C L A R A T I O N S                 *
 *******************************************/

coptic_module ModuleInfo;


/*******************************************
 * F U N C T I O N S                       *
 *******************************************/

const gchar *
g_module_check_init(void)
{
	ModuleInfo.uniqueModuleName = g_strdup("msn");
	ModuleInfo.version = 1;

	ModuleInfo.description = g_strdup("MSN protocol suite module");
	ModuleInfo.author = g_strdup("sanoi");
	ModuleInfo.authorEmail = g_strdup("sanoix@gmail.com");
	ModuleInfo.copyright = g_strdup("2006 Coptic IM Development Team");
	ModuleInfo.homepage = g_strdup("http://rl6.org/~sanoi");

	return NULL;
}

void
g_module_unload(void)
{
	if (ModuleInfo.uniqueModuleName != NULL)
		free(ModuleInfo.uniqueModuleName);
	if (ModuleInfo.description != NULL)
		free(ModuleInfo.description);
	if (ModuleInfo.author != NULL)
		free(ModuleInfo.author);
	if (ModuleInfo.authorEmail != NULL)
		free(ModuleInfo.authorEmail);
	if (ModuleInfo.copyright != NULL)
		free(ModuleInfo.copyright);
	if (ModuleInfo.homepage != NULL)
		free(ModuleInfo.homepage);
}

coptic_module *
GetModuleInfo()
{
	if (copticVersion > 0)
		return &ModuleInfo;
	else
		return NULL;
}
